package com.yjz.designpattern.decorator_pattern;

// 具体装饰：缓存功能
public class CacheDecorator extends TextEditorDecorator {
    public CacheDecorator(TextEditor textEditor) {
        super(textEditor);
    }

    @Override
    public String edit(String text) {
        // 添加缓存逻辑
        System.out.println("Cache check");
        return textEditor.edit(text);
    }
}